#!/usr/bin/env python
import httplib

header = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
createUserA = header + "<create name=\"User A\"/>"
registerUserADevice1 = header + "<register-device account-id=\"1\" device-id=\"1\"/>"
initiateC2DM = header + "<send-message account-id=\"1\"><parameter name=\"key1\" value=\"value1\"/></send-message>"
con = httplib.HTTPConnection("localhost", 8080)

con.connect()
con.request("POST", "/CoreServicesWeb/accounts", createUserA);
response = con.getresponse()
print response.status, response.reason
con.close()

#con.connect()
#con.request("POST", "/CoreServicesWeb/devices", registerUserADevice1)
#response = con.getresponse()
#print response.status, response.reason
#con.close()

#con.connect()
#con.request("POST", "/CoreServicesWeb/messages", initiateC2DM)
#print response.status, response.reason
#con.close()

